package org.dromara.hm.domain.vo.saleOrder;

import java.math.BigDecimal;
import java.util.Date;

import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.hm.domain.HmSaleOrderRefund;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 退款退货明细视图对象 hm_sale_order_refund
 *
 * @author Hzy
 * @date 2025-04-10
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = HmSaleOrderRefund.class)
public class HmSaleOrderRefundVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 退款记录ID
     */
    @ExcelProperty(value = "退款记录ID")
    private String refundId;

    /**
     * 关联销售订单ID
     */
    @ExcelProperty(value = "关联销售订单ID")
    private String saleId;

    /**
     * 关联商品ID
     */
    @ExcelProperty(value = "关联商品ID")
    private String saleProductId;

    /**
     * 商品名称
     */
    @Translation(type = TransConstant.PRODUCT_ID_TO_NAME, mapper = "saleProductId")
    private String saleProductName;

    /**
     * 商品类型
     */
    private String productType;

    /**
     * 类型（1-仅退款 2-退货退款）
     */
    @ExcelProperty(value = "类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "1=部分退,2=全部退")
    private Long refundType;

    /**
     * 本次退款金额
     */
    @ExcelProperty(value = "本次退款金额")
    private BigDecimal refundAmount;

    /**
     * 实际回填库存数量 (只包含已提货部分)
     */
    private BigDecimal actualReturnToStockNum;

    /**
     * 本次退货数量
     */
    @ExcelProperty(value = "本次退货数量")
    private BigDecimal returnNum;

    /**
     * 申请时间
     */
    @ExcelProperty(value = "申请时间")
    private Date applyTime;

    /**
     * 处理人ID
     */
    @ExcelProperty(value = "处理人ID")
    private String processorId;

    /**
     * 处理时间
     */
    @ExcelProperty(value = "处理时间")
    private Date processTime;

    /**
     * 状态（0-待审核 1-已通过 2-已拒绝 3-已完成）
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=-待审核,1=-已通过,2=-已拒绝,3=-已完成")
    private Integer status;

    /**
     * 原因编码（商品损坏/7天无理由等）
     */
    @ExcelProperty(value = "原因编码", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "商=品损坏/7天无理由等")
    private String reasonCode;

    /**
     * 详细描述
     */
    @ExcelProperty(value = "详细描述")
    private String description;

    /**
     * 证明材料（图片/文档路径）
     */
    @ExcelProperty(value = "证明材料", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "图=片/文档路径")
    private String proofFiles;

    /**
     * 退货源(YTH-已提货; WTH-未提货)
     */
    private String returnSource;


}
